home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / clang / ebksrc.zip / EB4.HPP < prev    next >
C/C++ Source or Header  |  1991-08-10  |  2KB  |  101 lines

  1. /*
  2.  
  3.     eb4.hpp
  4.     8-10-91
  5.     Electronic Book: header for eb4.cpp
  6.  
  7.     Copyright 1991
  8.     John W. Small
  9.     All rights reserved
  10.  
  11.     PSW / Power SoftWare
  12.     P.O. Box 10072
  13.     McLean, Virginia 22102 8072 USA
  14.  
  15.     John Small
  16.     Voice: (703) 759-3838
  17.     CIS: 73757,2233
  18.  
  19. */
  20.  
  21. #ifndef EB4_HPP
  22. #define EB4_HPP
  23.  
  24.  
  25. #ifndef FLEXLIST_CPP
  26. #include <flexlist.hpp>
  27. #endif
  28.  
  29. #ifndef EB1_HPP
  30. #include <eb1.hpp>
  31. #endif
  32.  
  33. #ifndef EB2_HPP
  34. #include <eb2.hpp>
  35. #endif
  36.  
  37. #ifndef EB3_HPP
  38. #include <eb3.hpp>
  39. #endif
  40.  
  41.  
  42. /*
  43.  
  44.     The Arguments class is a FlexList for vectorizing
  45.     a string of arguments.  It is used in the spawn
  46.     call of HyperView::view().
  47.  
  48. */
  49.  
  50. class Arguments : FlexList  {
  51.     char buf[MAX_ARG_LEN];
  52.     char ** V;
  53. public:
  54.     Arguments(const char * A);
  55.     unsigned argc()  { return (V? Nodes() : 0); }
  56.     char * argv0()  {  return (V? V[0] : (char *)0); }
  57.     char ** argv()  { return V; }
  58.     ~Arguments() { delete V; }
  59. };
  60. typedef Arguments *ArgumentS;
  61. #define ArgumentS0 ((ArgumentS)0)
  62.  
  63.  
  64.  
  65. /*
  66.  
  67.     The HyperView is the user inteface to EB's hypertext
  68.     engine.
  69.  
  70. */
  71.  
  72. class HyperView  {
  73.     HyperStack hstk;
  74.     HyperContexT HC;
  75.     HyperServer hser;
  76.     PickTOC TOC;
  77.     PickIDX IDX;
  78.     void help();
  79. public:
  80.     HyperView() : hstk(), hser()
  81.     {
  82.         HC = HyperContexT0;
  83.         TOC = PickTOC0;
  84.         IDX = PickIDX0;
  85.     }
  86.     int view(const char * hyperFname =
  87.         (char *)0, const char * topic = (char *)0,
  88.         int l = 5, int t = 5,
  89.         int r = 75, int b = 20);
  90.     int viewFullScreen(
  91.         const char * hyperFname = (char *) 0,
  92.         const char * topic = (char *) 0)
  93.         { return view(hyperFname,topic,0); }
  94.     ~HyperView();
  95. };
  96.  
  97.  
  98.  
  99. #endif
  100.  
  101.